import random

def generate_test_case(size_range=(1, 1000), val_range=(-10**5, 10**5), next_calls=100):
    """生成测试用例"""
    size = random.randint(*size_range)
    values = [random.randint(*val_range) for _ in range(next_calls)]
    return size, values

def write_test_case(filename, size, values):
    """将测试用例写入文件"""
    with open(filename, 'w') as f:
        f.write(f"{size}\n")
        f.write(' '.join(map(str, values)))

if __name__ == "__main__":
    size, values = generate_test_case(next_calls=1000)
    write_test_case("test_case.txt", size, values)
    print(f"Generated test case with size={size} and {len(values)} next calls")    